/*
 * Albareth - an action roleplaying game.
 * Copyright (C) 2008 Jens Anuth
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 *   02110-1301, USA.
 * 
 * $Id: GroundType.java 35 2008-05-05 14:16:37Z jens464 $
*/
package albareth.core.entity;

public class GroundType
{
    public static final GroundType NONE = new GroundType(0, 0);
    public static final GroundType WALL = new GroundType(0, 0);
    public static final GroundType WINDOW = new GroundType(0, 1);
    public static final GroundType FLOOR = new GroundType(1, 1);
    public static final GroundType FOREST = new GroundType(2, 0);
    public static final GroundType RIVER = new GroundType(2, 1);
    public static final GroundType WATER = new GroundType(0, 1);
    public static final GroundType MOUNTAIN = new GroundType(0, 0);
    public static final GroundType ROAD = new GroundType(1, 1);
    public static final GroundType LEA = new GroundType(1, 1);


    private int _walkCost; //0: no, 1: normal, 2: doppelte kosten
    private int _viewCost; //0: no, 1: normal, 2: doppelte kosten
    
    private GroundType(int walkCost, int viewCost)
    {
        _walkCost = walkCost;
        _viewCost = viewCost;
    }
    
    public int getWalkCost()
    {
        return _walkCost;
    }
    
    public boolean isWalkable()
    {
        return (_walkCost > 0 ? true : false);
    }

    public int getViewCost()
    {
        return _viewCost;
    }
    
    public boolean isTranslucent()
    {
        return (_viewCost > 0 ? true : false);
    }

    public boolean isWall()
    {
        return !isWalkable() && !isTranslucent();
    }
}
